import socket

sk = socket.socket(type=socket.SOCK_DGRAM)
server = ('127.0.0.1', 9001)
while True:
    sk.sendto('客户端向你问好!!'.encode('utf8'), server)
    msg = sk.recv(1024)
    print(msg.decode('utf8'))


